import {
  createRouter,
  createWebHistory,
  onBeforeRouteLeave,
  useRouter,
} from "vue-router";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/1",
      name: "wounded",
      meta: {
        title: "伤员",
        show: true,
      },
      component: () => import("../views/wounded.vue"),
    },
    {
      path: "",
      name: "goods",
      meta: {
        title: "物资统计",
        show: false,
      },
      component: () => import("../views/goods.vue"),
    },
  ],
});
const routeList = router.getRoutes();

export default router;
